// Copyrights by Kenneth Lee, 2022. All Rights Reserved
#include "value.hpp"
#include "ut.hpp"

int main(void) {
	ut_assert((Val(24) / Val(8))  == 3);
	ut_assert((Val(2, 3) + Val(2))  == Val(16, 6));
	ut_assert((Val(2, 3) - Val(2))  == Val(-4, 3));
	ut_assert((Val(2, 3) - Val(2, 3)) == 0);
	ut_assert((Val(2, 3) - Val(1, 3) - Val(1, 3)) == 0);
	ut_assert((Val(123, 321) * Val(321, 123)) == 1);
	ut_assert(((Val(123, 321) / Val(0)).state) == ValIf::ST_INV);

	return 0;
}
